import request from '@/utils/request'

export function login(data) {
    // console.log("denglu")
    return request({
        // url: '/vue-admin-template/user/login',
        // url: '/user/login',
        url: '/login/getLoginUserInfo',
        // method: 'post',
        method: 'get',
        // data
        params: {userId: "045810664926300137" }
    })
}
// 053007413129182122 项目主管
// 082663594029167659 部门主管

export function getInfo(token) {
    return request({
        url: '/user/info',
        method: 'get',
        params: {token}
    })
}

export function logout(userId) {
    return request({
        url: '/login/loginOut',
        method: 'get',
        params: {userId: userId}
    })
}


export function accountLogout(accountNumber) {
    return request({
        url: '/login/accountOut',
        method: 'get',
        params: {accountNumber}
    })
}



// ========================================================================='

export function http_login(){
    return request({
        url: '/login/getLoginUserInfo',
        method: 'get',
        params: {userId: "045810664926300137" }
    })
}


export function http_user_list(pageNum, pageSize, selectParam) {
    var params = {pageSize, pageNum, ...selectParam}
    // console.log(params)
    return request({
        url: '/user/list',
        method: 'get',
        params: params
    })
}


export function http_dropdownBox_depts() {
    return request({
        url: '/dropdownBox/dept/list',
        method: 'get',
    })
}

export function http_dropdownBox_roles() {
    return request({
        url: '/dropdownBox/role/list',
        method: 'get',
    })
}
